Hi
Mod function refers to the positive quantity of the given. Now if we have Mod x, then x can be + or - , therefore we take both signs + and - , so that watever may be the case, the apt sign is used to get the positive result.
Other Related Questions on magical mathematics[interesting approach]